<!DOCTYPE html>
<html lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>dual_rank [HALCON算子参考手册]</title>
<style type="text/css">
      body {
    color: #000000;
    background-color: #ffffff;
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
}

.body_main {
    margin-left: 35px;
    margin-right: 35px;
}

@media screen and (min-width:992px) {

    .body_main {
        margin-left: 10%;
        margin-right: 10%;
    }

    table.toctable {
        width: 80%
    }
}

@media screen and (min-width:1400px) {

    .body_main {
        margin-left: 15%;
        margin-right: 15%;
    }

    table.toctable {
        width: 70%
    }
}

body>div ul ul {
    margin-left: inherit;
}

a:link {
    color: #0044cc;
}

a:link,
a:visited {
    text-decoration: none;
}

a:link:hover,
a:visited:hover {
    text-decoration: underline;
}

th {
    text-align: left;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    text-rendering: optimizeLegibility;
    color: #666666;
}

code {
    font-family: monospace,monospace;
}

h1 a.halconoperator {
    font-family: Arial, Helvetica, sans-serif;
    color: #666666;
}

h2 a.halconoperator {
    font-family: Arial, Helvetica, sans-serif;
    color: #666666;
}

hr {
    border: 0;
    border-top: solid 1px #f28d26;
}

.pre {
    display: block;
    padding-bottom: 1ex;
    font-family: monospace;
    white-space: pre;
}

pre {
    font-family: monospace, monospace;
    padding: 1ex;
    white-space: pre-wrap;
}

.toc {
    font-size: 80%;
    border-top: 1px dashed #f28d26;
    border-bottom: 1px dashed #f28d26;
    padding-top: 5px;
    padding-bottom: 5px;
}

.inv {
    margin: 0;
    border: 0;
    padding: 0;
}

.banner {
    color: #666666;
    padding-left: 1em;
}

.logo {
    background-color: white;
}

.keyboard {
    font-size: 80%;
    padding-left: 3px;
    padding-right: 3px;
    border-radius: 5px;
    border-width: 1px;
    border-style: solid;
    border-color: #f28d26;
    background-color: #f3f3f3;
}

.warning {
    margin-top: 2ex;
    margin-bottom: 1ex;
    padding: 10px;
    text-align: center;
    border: 1px solid;
    color: #bb0000;
    background-color: #fff7f7
}

.imprint {
    margin-top: 1ex;
    font-size: 80%;
    color: #666666;
}

.imprinthead {
    font-weight: bolder;
    color: #666666;
}

.indexlink {
    text-align: right;
    padding-bottom: 5px;
}

.postscript {
    margin-top: 2ex;
    font-size: 80%;
    color: #666666
}

.evenrow {
    background-color: #e7e7ef;
    vertical-align: top;
}

.oddrow {
    background-color: #f7f7ff;
    vertical-align: top;
}

.headrow {
    background-color: #97979f;
    color: #ffffff;
    vertical-align: top;
}

.logorow {
    vertical-align: top;
}

.error {
    color: red;
}

.var {
    font-style: italic
}

.halconoperator {
    font-family: monospace, monospace;
}

span.operator {
    font-family: monospace, monospace;
}

span.procedure {
    font-family: monospace, monospace;
}

span.operation {
    font-family: monospace, monospace;
}

span.feature {
    font-family: Arial, Helvetica, Homerton, sans-serif;
}

ul {
    padding-left: 1.2em;
}

li.dot {
    list-style-type: square;
    color: #f28d26;
}

.breadcrumb {
    font-size: 80%;
    color: white;
    background-color: #062d64;
    margin-bottom: 20px;
    padding-left: 35px;
    padding-right: 35px;
    padding-bottom: 15px;
}

.webbar {
    font-size: 80%;
    background-color: #dddddd;
    margin-top: 0px;
    margin-left: -35px;
    margin-right: -35px;
    margin-bottom: 0px;
    padding-top: 5px;
    padding-left: 35px;
    padding-right: 35px;
    padding-bottom: 5px;
}

.footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    border-top: 1px dashed #f28d26;
    font-size: 80%;
    color: #666666;
    padding-bottom: 8px;
}

.footer .socialmedia a {
    padding-left: 7px;
}

.socialmedia {
    padding-top: 10px;
}

.copyright {
    margin-top: 19px;
}

.breadcrumb a {
    color: #ffffff;
    border-bottom: 1px solid white;
}

.breadcrumb a:link:hover,
.breadcrumb a:visited:hover {
    text-decoration: none;
    border-bottom: none;
}

.heading {
    margin-top: 1ex;
    font-size: 110%;
    font-weight: bold;
    color: #666666;
}

.text {
    color: black;
}

.example {
    font-size: 80%;
    background-color: #f3f3f3;
    border: 1px dashed #666666;
    padding: 10px;
}

.displaymath {
    display: block;
    text-align: center;
    margin-top: 1ex;
    margin-bottom: 1ex;
}

.title {
    float: left;
    padding-top: 3px;
    padding-bottom: 3px;
}

.signnote {
    font-family: Arial, Helvetica, Homerton, sans-serif;
    font-size: 80%;
    color: #666666;
    font-weight: lighter;
    font-style: italic
}

.par {
    margin-bottom: 1.5em;
}

.parhead {
    text-align: right;
}

.parname {
    float: left;
}

.pardesc {
    font-size: 85%;
    margin-top: 0.5em;
    margin-bottom: 0.5em;
    margin-left: 2em;
}

.parcat {
    color: #666;
    font-weight: bold;
}

*[data-if=cpp],
*[data-if=c],
*[data-if=dotnet],
*[data-if=com],
*[data-if=python] {
    display: none;
}

.tabbar {
    text-align: right;
    border-bottom: 1px solid #f28d26;
    margin-bottom: 0.5em;
}

ul.tabs {
    padding-top: 3px;
    padding-bottom: 3px;
    margin-top: 10px;
    margin-bottom: 0;
    font-size: 80%
}

ul.tabs li {
    padding-top: 3px;
    padding-bottom: 3px;
    display: inline;
    overflow: hidden;
    list-style-type: none;
    margin: 0;
    margin-left: 8px;
    border-top: 1px solid #666;
    border-left: 1px solid #666;
    border-right: 1px solid #666;
}

ul.tabs li.active {
    border-left: 1px solid #f28d26;
    border-right: 1px solid #f28d26;
    border-top: 1px solid #f28d26;
    border-bottom: 1px solid #fff;
}

ul.tabs li.inactive {
    background-color: #eee;
}

ul.tabs li a {
    padding-left: 5px;
    padding-right: 5px;
    color: #666;
}

ul.tabs li a:link:hover {
    text-decoration: none;
}

ul.tabs li.inactive a {
    color: #666;
}

ul.tabs li.active a {
    color: black;
}

dl.generic dd {
    margin-bottom: 1em;
}

.pari {
    color: olive;
}

.paro {
    color: maroon;
}

.comment {
    font-size: 80%;
    color: green;
    white-space: nowrap;
}

table.grid {
    border-collapse: collapse;
}

table.grid td {
    padding: 5px;
    border: 1px solid;
}

table.layout {
    border: 0px;
}

table.layout td {
    padding: 5px;
}

table.table {
    border-collapse: collapse;
}

table.table td {
    padding: 5px;
    border-left: 0px;
    border-right: 0px;
}

table.table tr:last-child {
    border-bottom: 1px solid;
}

table.table th {
    padding: 5px;
    border-top: 1px solid;
    border-bottom: 1px solid;
    border-left: 0px;
    border-right: 0px;
}

.details_summary {
    cursor: pointer;
}

table.toctable {
    width: 100%;
}

table.toctable col:first-child {
    width: 20%;
}

table.toctable col:nth-last-child(2) {
    width: 8%;
}

table.altcolored tr:nth-child(even) {
    background-color: #f3f3f3;
}

    </style>
<!--OP_REF_STYLE_END-->
<script>
    <!--
var active_lang='hdevelop';function switchVisibility(obj,active_lang,new_lang)
{var display_style='inline';
for(var i=0;i<obj.length;i++)
{if(obj.item(i).getAttribute('data-if')==new_lang)
{obj.item(i).style.display=display_style;}
if(obj.item(i).getAttribute('data-if')==active_lang)
{obj.item(i).style.display='none';}}
return;}
function toggleLanguage(new_lang,initial)
{if(active_lang!=new_lang)
{var lis=document.getElementsByTagName('li');for(var i=0;i<lis.length;i++)
{if(lis.item(i).id=='syn-'+new_lang)
{lis.item(i).className='active';}
else
{lis.item(i).className='inactive';}}
var divs=document.getElementsByTagName('div');var spans=document.getElementsByTagName('span');switchVisibility(divs,active_lang,new_lang);switchVisibility(spans,active_lang,new_lang);if(!initial)
{setCookie("halcon_reference_language",new_lang,null,null);}
active_lang=new_lang;}
return;}
function setCookie(name,value,domain,exp_offset,path,secure)
{localStorage.setItem(name,value);}
function getCookie(name)
{return localStorage.getItem(name);}
function initialize()
{var qs=location.href.split('?')[1];var qs_lang_raw=location.href.split('interface=')[1];var qs_lang;if(qs_lang_raw)
{qs_lang=qs_lang_raw.split('#')[0];}
var cookie_lang=getCookie("halcon_reference_language");var new_lang;if((qs_lang=="hdevelop")||(qs_lang=="dotnet")||(qs_lang=="python")||(qs_lang=="cpp")||(qs_lang=="c"))
{new_lang=qs_lang;setCookie("halcon_reference_language",new_lang,null,null);}
else if((cookie_lang=="hdevelop")||(cookie_lang=="dotnet")||(cookie_lang=="python")||(cookie_lang=="cpp")||(cookie_lang=="c"))
{new_lang=cookie_lang;}
else
{new_lang="hdevelop";}
toggleLanguage(new_lang,1);return;}
-->

  </script>
</head>
<body onload="initialize();">
<div class="breadcrumb">
<br class="inv"><a href="index.html">目录</a> / <a href="toc_morphology.html">形态学</a> / <a href="toc_morphology_grayvalues.html">Gray Values</a><br class="inv">
</div>
<div class="body_main">
<div class="tabbar"><ul class="tabs">
<li id="syn-hdevelop" class="active"><a href="javascript:void(0);" onclick="toggleLanguage('hdevelop')" onfocus="blur()">HDevelop</a></li>
<li id="syn-dotnet" class="inactive"><a href="javascript:void(0);" onclick="toggleLanguage('dotnet')" onfocus="blur()">.NET</a></li>
<li id="syn-python" class="inactive"><a href="javascript:void(0);" onclick="toggleLanguage('python')" onfocus="blur()">Python</a></li>
<li id="syn-cpp" class="inactive"><a href="javascript:void(0);" onclick="toggleLanguage('cpp')" onfocus="blur()">C++</a></li>
<li id="syn-c" class="inactive"><a href="javascript:void(0);" onclick="toggleLanguage('c')" onfocus="blur()">C</a></li>
</ul></div>
<div class="indexlink">
<a href="index_classes.html"><span data-if="dotnet" style="display:none;">类别</span><span data-if="cpp" style="display:none;">类别</span></a><span data-if="dotnet" style="display:none;"> | </span><span data-if="cpp" style="display:none;"> | </span><a href="index_by_name.html">算子列表</a>
</div>
<!--OP_REF_HEADER_END-->
<h1 id="sec_name">
<span data-if="hdevelop" style="display:inline;">dual_rank</span><span data-if="c" style="display:none;">dual_rank</span><span data-if="cpp" style="display:none;">DualRank</span><span data-if="dotnet" style="display:none;">DualRank</span><span data-if="python" style="display:none;">dual_rank</span> (算子名称)</h1>
<h2>名称</h2>
<p><code><span data-if="hdevelop" style="display:inline;">dual_rank</span><span data-if="c" style="display:none;">dual_rank</span><span data-if="cpp" style="display:none;">DualRank</span><span data-if="dotnet" style="display:none;">DualRank</span><span data-if="python" style="display:none;">dual_rank</span></code> — Opening, Median and Closing with circle or rectangle mask.</p>
<h2 id="sec_synopsis">参数签名</h2>
<div data-if="hdevelop" style="display:inline;">
<p>
<code><b>dual_rank</b>(<a href="#Image"><i>Image</i></a> : <a href="#ImageRank"><i>ImageRank</i></a> : <a href="#MaskType"><i>MaskType</i></a>, <a href="#Radius"><i>Radius</i></a>, <a href="#ModePercent"><i>ModePercent</i></a>, <a href="#Margin"><i>Margin</i></a> : )</code></p>
</div>
<div data-if="c" style="display:none;">
<p>
<code>Herror <b>dual_rank</b>(const Hobject <a href="#Image"><i>Image</i></a>, Hobject* <a href="#ImageRank"><i>ImageRank</i></a>, const char* <a href="#MaskType"><i>MaskType</i></a>, const Hlong <a href="#Radius"><i>Radius</i></a>, const Hlong <a href="#ModePercent"><i>ModePercent</i></a>, const char* <a href="#Margin"><i>Margin</i></a>)</code></p>
<p>
<code>Herror <b>T_dual_rank</b>(const Hobject <a href="#Image"><i>Image</i></a>, Hobject* <a href="#ImageRank"><i>ImageRank</i></a>, const Htuple <a href="#MaskType"><i>MaskType</i></a>, const Htuple <a href="#Radius"><i>Radius</i></a>, const Htuple <a href="#ModePercent"><i>ModePercent</i></a>, const Htuple <a href="#Margin"><i>Margin</i></a>)</code></p>
</div>
<div data-if="cpp" style="display:none;">
<p>
<code>void <b>DualRank</b>(const HObject&amp; <a href="#Image"><i>Image</i></a>, HObject* <a href="#ImageRank"><i>ImageRank</i></a>, const HTuple&amp; <a href="#MaskType"><i>MaskType</i></a>, const HTuple&amp; <a href="#Radius"><i>Radius</i></a>, const HTuple&amp; <a href="#ModePercent"><i>ModePercent</i></a>, const HTuple&amp; <a href="#Margin"><i>Margin</i></a>)</code></p>
<p>
<code><a href="HImage.html">HImage</a> <a href="HImage.html">HImage</a>::<b>DualRank</b>(const HString&amp; <a href="#MaskType"><i>MaskType</i></a>, Hlong <a href="#Radius"><i>Radius</i></a>, Hlong <a href="#ModePercent"><i>ModePercent</i></a>, const HTuple&amp; <a href="#Margin"><i>Margin</i></a>) const</code></p>
<p>
<code><a href="HImage.html">HImage</a> <a href="HImage.html">HImage</a>::<b>DualRank</b>(const HString&amp; <a href="#MaskType"><i>MaskType</i></a>, Hlong <a href="#Radius"><i>Radius</i></a>, Hlong <a href="#ModePercent"><i>ModePercent</i></a>, const HString&amp; <a href="#Margin"><i>Margin</i></a>) const</code></p>
<p>
<code><a href="HImage.html">HImage</a> <a href="HImage.html">HImage</a>::<b>DualRank</b>(const char* <a href="#MaskType"><i>MaskType</i></a>, Hlong <a href="#Radius"><i>Radius</i></a>, Hlong <a href="#ModePercent"><i>ModePercent</i></a>, const char* <a href="#Margin"><i>Margin</i></a>) const</code></p>
<p>
<code><a href="HImage.html">HImage</a> <a href="HImage.html">HImage</a>::<b>DualRank</b>(const wchar_t* <a href="#MaskType"><i>MaskType</i></a>, Hlong <a href="#Radius"><i>Radius</i></a>, Hlong <a href="#ModePercent"><i>ModePercent</i></a>, const wchar_t* <a href="#Margin"><i>Margin</i></a>) const  <span class="signnote">
            (
            Windows only)
          </span></code></p>
</div>
<div data-if="com" style="display:none;"></div>
<div data-if="dotnet" style="display:none;">
<p>
<code>static void <a href="HOperatorSet.html">HOperatorSet</a>.<b>DualRank</b>(<a href="HObject.html">HObject</a> <a href="#Image"><i>image</i></a>, out <a href="HObject.html">HObject</a> <a href="#ImageRank"><i>imageRank</i></a>, <a href="HTuple.html">HTuple</a> <a href="#MaskType"><i>maskType</i></a>, <a href="HTuple.html">HTuple</a> <a href="#Radius"><i>radius</i></a>, <a href="HTuple.html">HTuple</a> <a href="#ModePercent"><i>modePercent</i></a>, <a href="HTuple.html">HTuple</a> <a href="#Margin"><i>margin</i></a>)</code></p>
<p>
<code><a href="HImage.html">HImage</a> <a href="HImage.html">HImage</a>.<b>DualRank</b>(string <a href="#MaskType"><i>maskType</i></a>, int <a href="#Radius"><i>radius</i></a>, int <a href="#ModePercent"><i>modePercent</i></a>, <a href="HTuple.html">HTuple</a> <a href="#Margin"><i>margin</i></a>)</code></p>
<p>
<code><a href="HImage.html">HImage</a> <a href="HImage.html">HImage</a>.<b>DualRank</b>(string <a href="#MaskType"><i>maskType</i></a>, int <a href="#Radius"><i>radius</i></a>, int <a href="#ModePercent"><i>modePercent</i></a>, string <a href="#Margin"><i>margin</i></a>)</code></p>
</div>
<div data-if="python" style="display:none;">
<p>
<code>def <b>dual_rank</b>(<a href="#Image"><i>image</i></a>: HObject, <a href="#MaskType"><i>mask_type</i></a>: str, <a href="#Radius"><i>radius</i></a>: int, <a href="#ModePercent"><i>mode_percent</i></a>: int, <a href="#Margin"><i>margin</i></a>: Union[int, float, str]) -&gt; HObject</code></p>
</div>
<h2 id="sec_description">描述</h2>
<p>该算子 <code><span data-if="hdevelop" style="display:inline">dual_rank</span><span data-if="c" style="display:none">dual_rank</span><span data-if="cpp" style="display:none">DualRank</span><span data-if="com" style="display:none">DualRank</span><span data-if="dotnet" style="display:none">DualRank</span><span data-if="python" style="display:none">dual_rank</span></code> carries out a non-linear
transformation of the gray values of all input images
(<a href="#Image"><i><code><span data-if="hdevelop" style="display:inline">Image</span><span data-if="c" style="display:none">Image</span><span data-if="cpp" style="display:none">Image</span><span data-if="com" style="display:none">Image</span><span data-if="dotnet" style="display:none">image</span><span data-if="python" style="display:none">image</span></code></i></a>).  Circles or squares can be used as structuring
elements.  该算子 <code><span data-if="hdevelop" style="display:inline">dual_rank</span><span data-if="c" style="display:none">dual_rank</span><span data-if="cpp" style="display:none">DualRank</span><span data-if="com" style="display:none">DualRank</span><span data-if="dotnet" style="display:none">DualRank</span><span data-if="python" style="display:none">dual_rank</span></code> effects two
consecutive calls of <a href="rank_image.html"><code><span data-if="hdevelop" style="display:inline">rank_image</span><span data-if="c" style="display:none">rank_image</span><span data-if="cpp" style="display:none">RankImage</span><span data-if="com" style="display:none">RankImage</span><span data-if="dotnet" style="display:none">RankImage</span><span data-if="python" style="display:none">rank_image</span></code></a>.  At the first call the
range gray value is calculated with the indicated range
(<a href="#ModePercent"><i><code><span data-if="hdevelop" style="display:inline">ModePercent</span><span data-if="c" style="display:none">ModePercent</span><span data-if="cpp" style="display:none">ModePercent</span><span data-if="com" style="display:none">ModePercent</span><span data-if="dotnet" style="display:none">modePercent</span><span data-if="python" style="display:none">mode_percent</span></code></i></a>).  The result of this calculation is the
input of a further call of <a href="rank_image.html"><code><span data-if="hdevelop" style="display:inline">rank_image</span><span data-if="c" style="display:none">rank_image</span><span data-if="cpp" style="display:none">RankImage</span><span data-if="com" style="display:none">RankImage</span><span data-if="dotnet" style="display:none">RankImage</span><span data-if="python" style="display:none">rank_image</span></code></a>, this time using the
range value 100-<a href="#ModePercent"><i><code><span data-if="hdevelop" style="display:inline">ModePercent</span><span data-if="c" style="display:none">ModePercent</span><span data-if="cpp" style="display:none">ModePercent</span><span data-if="com" style="display:none">ModePercent</span><span data-if="dotnet" style="display:none">modePercent</span><span data-if="python" style="display:none">mode_percent</span></code></i></a>.
</p>
<p>When filtering different parameters for border treatment
(<a href="#Margin"><i><code><span data-if="hdevelop" style="display:inline">Margin</span><span data-if="c" style="display:none">Margin</span><span data-if="cpp" style="display:none">Margin</span><span data-if="com" style="display:none">Margin</span><span data-if="dotnet" style="display:none">margin</span><span data-if="python" style="display:none">margin</span></code></i></a>) can be chosen:
<span class="pre">
    gray value   Pixels outside of the image edges
                 are assumed to be constant (with the
                 indicated gray value).
    'continued'  Continuation of edge pixels.
    'cyclic'     Cyclic continuation of image edges.
    'mirrored'   Reflection of pixels at the image edges.
</span>
A range filtering is calculated according to the following scheme:
The indicated mask is put over the image to be filtered in such a
way that the center of the mask touches all pixels once.  For each
of these pixels all neighboring pixels covered by the mask are
sorted in an ascending sequence corresponding to their gray values.
Each sorted sequence of gray values contains the same number of gray
values like the mask has image points.  The n-th highest element, (=
<a href="#ModePercent"><i><code><span data-if="hdevelop" style="display:inline">ModePercent</span><span data-if="c" style="display:none">ModePercent</span><span data-if="cpp" style="display:none">ModePercent</span><span data-if="com" style="display:none">ModePercent</span><span data-if="dotnet" style="display:none">modePercent</span><span data-if="python" style="display:none">mode_percent</span></code></i></a>, rank values between 0...100 in
percent) is selected and set as result gray value in the
corresponding result  image.
</p>
<p>If <a href="#ModePercent"><i><code><span data-if="hdevelop" style="display:inline">ModePercent</span><span data-if="c" style="display:none">ModePercent</span><span data-if="cpp" style="display:none">ModePercent</span><span data-if="com" style="display:none">ModePercent</span><span data-if="dotnet" style="display:none">modePercent</span><span data-if="python" style="display:none">mode_percent</span></code></i></a> is 0, then 该算子 equals to the
gray value opening (<a href="gray_opening.html"><code><span data-if="hdevelop" style="display:inline">gray_opening</span><span data-if="c" style="display:none">gray_opening</span><span data-if="cpp" style="display:none">GrayOpening</span><span data-if="com" style="display:none">GrayOpening</span><span data-if="dotnet" style="display:none">GrayOpening</span><span data-if="python" style="display:none">gray_opening</span></code></a>).  If
<a href="#ModePercent"><i><code><span data-if="hdevelop" style="display:inline">ModePercent</span><span data-if="c" style="display:none">ModePercent</span><span data-if="cpp" style="display:none">ModePercent</span><span data-if="com" style="display:none">ModePercent</span><span data-if="dotnet" style="display:none">modePercent</span><span data-if="python" style="display:none">mode_percent</span></code></i></a> is 50, 该算子 results in the median
filter, which is applied twice (<a href="median_image.html"><code><span data-if="hdevelop" style="display:inline">median_image</span><span data-if="c" style="display:none">median_image</span><span data-if="cpp" style="display:none">MedianImage</span><span data-if="com" style="display:none">MedianImage</span><span data-if="dotnet" style="display:none">MedianImage</span><span data-if="python" style="display:none">median_image</span></code></a>).  The
<a href="#ModePercent"><i><code><span data-if="hdevelop" style="display:inline">ModePercent</span><span data-if="c" style="display:none">ModePercent</span><span data-if="cpp" style="display:none">ModePercent</span><span data-if="com" style="display:none">ModePercent</span><span data-if="dotnet" style="display:none">modePercent</span><span data-if="python" style="display:none">mode_percent</span></code></i></a> 100 in <code><span data-if="hdevelop" style="display:inline">dual_rank</span><span data-if="c" style="display:none">dual_rank</span><span data-if="cpp" style="display:none">DualRank</span><span data-if="com" style="display:none">DualRank</span><span data-if="dotnet" style="display:none">DualRank</span><span data-if="python" style="display:none">dual_rank</span></code> means that it
calculates the gray value closing (<a href="gray_closing.html"><code><span data-if="hdevelop" style="display:inline">gray_closing</span><span data-if="c" style="display:none">gray_closing</span><span data-if="cpp" style="display:none">GrayClosing</span><span data-if="com" style="display:none">GrayClosing</span><span data-if="dotnet" style="display:none">GrayClosing</span><span data-if="python" style="display:none">gray_closing</span></code></a>).
Choosing parameter values inside this range results in a smooth
transformation of these operators.
</p>
<p>For an explanation of the concept of smoothing filters see the introduction
of chapter <a href="toc_filters_smoothing.html">Filters / Smoothing</a>.</p>
<h2 id="sec_attention">注意</h2>
<p>Note that filter operators may return unexpected results if
an image with a reduced domain is used as input. Please refer to the
chapter <a href="toc_filters.html">过滤器</a>.</p>
<h2 id="sec_execution">运行信息</h2>
<ul>
  <li>多线程类型:可重入(与非独占操作符并行运行)。</li>
<li>多线程作用域:全局(可以从任何线程调用)。</li>
  
    <li>在元组级别自动并行化。</li>
    <li>在图像通道级别自动并行化。</li>
    <li>Automatically parallelized on  domain level.</li>
  
</ul>
<h2 id="sec_parameters">参数表</h2>
  <div class="par">
<div class="parhead">
<span id="Image" class="parname"><b><code><span data-if="hdevelop" style="display:inline">Image</span><span data-if="c" style="display:none">Image</span><span data-if="cpp" style="display:none">Image</span><span data-if="com" style="display:none">Image</span><span data-if="dotnet" style="display:none">image</span><span data-if="python" style="display:none">image</span></code></b> (input_object)  </span><span>(multichannel-)image(-array) <code>→</code> <span data-if="hdevelop" style="display:inline">object</span><span data-if="dotnet" style="display:none"><a href="HImage.html">HImage</a></span><span data-if="python" style="display:none">HObject</span><span data-if="cpp" style="display:none"><a href="HImage.html">HImage</a></span><span data-if="c" style="display:none">Hobject</span> (byte / int2 / uint2 / int4 / real)</span>
</div>
<p class="pardesc">Image to be filtered.</p>
</div>
  <div class="par">
<div class="parhead">
<span id="ImageRank" class="parname"><b><code><span data-if="hdevelop" style="display:inline">ImageRank</span><span data-if="c" style="display:none">ImageRank</span><span data-if="cpp" style="display:none">ImageRank</span><span data-if="com" style="display:none">ImageRank</span><span data-if="dotnet" style="display:none">imageRank</span><span data-if="python" style="display:none">image_rank</span></code></b> (output_object)  </span><span>multichannel-image(-array) <code>→</code> <span data-if="hdevelop" style="display:inline">object</span><span data-if="dotnet" style="display:none"><a href="HImage.html">HImage</a></span><span data-if="python" style="display:none">HObject</span><span data-if="cpp" style="display:none"><a href="HImage.html">HImage</a></span><span data-if="c" style="display:none">Hobject *</span> (byte / int2 / uint2 / int4 / real)</span>
</div>
<p class="pardesc">Filtered Image.</p>
</div>
  <div class="par">
<div class="parhead">
<span id="MaskType" class="parname"><b><code><span data-if="hdevelop" style="display:inline">MaskType</span><span data-if="c" style="display:none">MaskType</span><span data-if="cpp" style="display:none">MaskType</span><span data-if="com" style="display:none">MaskType</span><span data-if="dotnet" style="display:none">maskType</span><span data-if="python" style="display:none">mask_type</span></code></b> (input_control)  </span><span>string <code>→</code> <span data-if="dotnet" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="python" style="display:none">str</span><span data-if="cpp" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="c" style="display:none">Htuple</span><span data-if="hdevelop" style="display:inline"> (string)</span><span data-if="dotnet" style="display:none"> (<i>string</i>)</span><span data-if="cpp" style="display:none"> (<i>HString</i>)</span><span data-if="c" style="display:none"> (<i>char*</i>)</span></span>
</div>
<p class="pardesc">Shape of the mask.</p>
<p class="pardesc"><span class="parcat">Default:
      </span>
    <span data-if="hdevelop" style="display:inline">'circle'</span>
    <span data-if="c" style="display:none">"circle"</span>
    <span data-if="cpp" style="display:none">"circle"</span>
    <span data-if="com" style="display:none">"circle"</span>
    <span data-if="dotnet" style="display:none">"circle"</span>
    <span data-if="python" style="display:none">"circle"</span>
</p>
<p class="pardesc"><span class="parcat">List of values:
      </span><span data-if="hdevelop" style="display:inline">'circle'</span><span data-if="c" style="display:none">"circle"</span><span data-if="cpp" style="display:none">"circle"</span><span data-if="com" style="display:none">"circle"</span><span data-if="dotnet" style="display:none">"circle"</span><span data-if="python" style="display:none">"circle"</span>, <span data-if="hdevelop" style="display:inline">'square'</span><span data-if="c" style="display:none">"square"</span><span data-if="cpp" style="display:none">"square"</span><span data-if="com" style="display:none">"square"</span><span data-if="dotnet" style="display:none">"square"</span><span data-if="python" style="display:none">"square"</span></p>
</div>
  <div class="par">
<div class="parhead">
<span id="Radius" class="parname"><b><code><span data-if="hdevelop" style="display:inline">Radius</span><span data-if="c" style="display:none">Radius</span><span data-if="cpp" style="display:none">Radius</span><span data-if="com" style="display:none">Radius</span><span data-if="dotnet" style="display:none">radius</span><span data-if="python" style="display:none">radius</span></code></b> (input_control)  </span><span>integer <code>→</code> <span data-if="dotnet" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="python" style="display:none">int</span><span data-if="cpp" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="c" style="display:none">Htuple</span><span data-if="hdevelop" style="display:inline"> (integer)</span><span data-if="dotnet" style="display:none"> (<i>int</i> / </span><span data-if="dotnet" style="display:none">long)</span><span data-if="cpp" style="display:none"> (<i>Hlong</i>)</span><span data-if="c" style="display:none"> (<i>Hlong</i>)</span></span>
</div>
<p class="pardesc">Radius of the filter mask.</p>
<p class="pardesc"><span class="parcat">Default:
      </span>1</p>
<p class="pardesc"><span class="parcat">Suggested values:
      </span>1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 15, 19, 25, 31, 39, 47, 59</p>
<p class="pardesc"><span class="parcat">Value range:
      </span><code>1
          ≤
        
    <span data-if="hdevelop" style="display:inline">Radius</span>
    <span data-if="c" style="display:none">Radius</span>
    <span data-if="cpp" style="display:none">Radius</span>
    <span data-if="com" style="display:none">Radius</span>
    <span data-if="dotnet" style="display:none">radius</span>
    <span data-if="python" style="display:none">radius</span>
    
          ≤
          101</code></p>
<p class="pardesc"><span class="parcat">Minimum increment:
      </span>1</p>
<p class="pardesc"><span class="parcat">Recommended increment:
      </span>2</p>
</div>
  <div class="par">
<div class="parhead">
<span id="ModePercent" class="parname"><b><code><span data-if="hdevelop" style="display:inline">ModePercent</span><span data-if="c" style="display:none">ModePercent</span><span data-if="cpp" style="display:none">ModePercent</span><span data-if="com" style="display:none">ModePercent</span><span data-if="dotnet" style="display:none">modePercent</span><span data-if="python" style="display:none">mode_percent</span></code></b> (input_control)  </span><span>integer <code>→</code> <span data-if="dotnet" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="python" style="display:none">int</span><span data-if="cpp" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="c" style="display:none">Htuple</span><span data-if="hdevelop" style="display:inline"> (integer)</span><span data-if="dotnet" style="display:none"> (<i>int</i> / </span><span data-if="dotnet" style="display:none">long)</span><span data-if="cpp" style="display:none"> (<i>Hlong</i>)</span><span data-if="c" style="display:none"> (<i>Hlong</i>)</span></span>
</div>
<p class="pardesc">Filter Mode: 0 corresponds to a gray value
opening , 50 corresponds to a median and 100 to
a gray values closing.</p>
<p class="pardesc"><span class="parcat">Default:
      </span>10</p>
<p class="pardesc"><span class="parcat">Suggested values:
      </span>0, 2, 5, 10, 15, 20, 40, 50, 60, 80, 85, 90, 95, 98, 100</p>
<p class="pardesc"><span class="parcat">Value range:
      </span><code>0
          ≤
        
    <span data-if="hdevelop" style="display:inline">ModePercent</span>
    <span data-if="c" style="display:none">ModePercent</span>
    <span data-if="cpp" style="display:none">ModePercent</span>
    <span data-if="com" style="display:none">ModePercent</span>
    <span data-if="dotnet" style="display:none">modePercent</span>
    <span data-if="python" style="display:none">mode_percent</span>
    
          ≤
          100</code></p>
<p class="pardesc"><span class="parcat">Minimum increment:
      </span>1</p>
<p class="pardesc"><span class="parcat">Recommended increment:
      </span>2</p>
</div>
  <div class="par">
<div class="parhead">
<span id="Margin" class="parname"><b><code><span data-if="hdevelop" style="display:inline">Margin</span><span data-if="c" style="display:none">Margin</span><span data-if="cpp" style="display:none">Margin</span><span data-if="com" style="display:none">Margin</span><span data-if="dotnet" style="display:none">margin</span><span data-if="python" style="display:none">margin</span></code></b> (input_control)  </span><span>string <code>→</code> <span data-if="dotnet" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="python" style="display:none">Union[int, float, str]</span><span data-if="cpp" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="c" style="display:none">Htuple</span><span data-if="hdevelop" style="display:inline"> (string / </span><span data-if="hdevelop" style="display:inline">integer / </span><span data-if="hdevelop" style="display:inline">real)</span><span data-if="dotnet" style="display:none"> (<i>string</i> / </span><span data-if="dotnet" style="display:none">int / </span><span data-if="dotnet" style="display:none">long / </span><span data-if="dotnet" style="display:none">double)</span><span data-if="cpp" style="display:none"> (<i>HString</i> / </span><span data-if="cpp" style="display:none">Hlong / </span><span data-if="cpp" style="display:none">double)</span><span data-if="c" style="display:none"> (<i>char*</i> / </span><span data-if="c" style="display:none">Hlong / </span><span data-if="c" style="display:none">double)</span></span>
</div>
<p class="pardesc">Border treatment.</p>
<p class="pardesc"><span class="parcat">Default:
      </span>
    <span data-if="hdevelop" style="display:inline">'mirrored'</span>
    <span data-if="c" style="display:none">"mirrored"</span>
    <span data-if="cpp" style="display:none">"mirrored"</span>
    <span data-if="com" style="display:none">"mirrored"</span>
    <span data-if="dotnet" style="display:none">"mirrored"</span>
    <span data-if="python" style="display:none">"mirrored"</span>
</p>
<p class="pardesc"><span class="parcat">Suggested values:
      </span><span data-if="hdevelop" style="display:inline">'mirrored'</span><span data-if="c" style="display:none">"mirrored"</span><span data-if="cpp" style="display:none">"mirrored"</span><span data-if="com" style="display:none">"mirrored"</span><span data-if="dotnet" style="display:none">"mirrored"</span><span data-if="python" style="display:none">"mirrored"</span>, <span data-if="hdevelop" style="display:inline">'cyclic'</span><span data-if="c" style="display:none">"cyclic"</span><span data-if="cpp" style="display:none">"cyclic"</span><span data-if="com" style="display:none">"cyclic"</span><span data-if="dotnet" style="display:none">"cyclic"</span><span data-if="python" style="display:none">"cyclic"</span>, <span data-if="hdevelop" style="display:inline">'continued'</span><span data-if="c" style="display:none">"continued"</span><span data-if="cpp" style="display:none">"continued"</span><span data-if="com" style="display:none">"continued"</span><span data-if="dotnet" style="display:none">"continued"</span><span data-if="python" style="display:none">"continued"</span>, 0, 30, 60, 90, 120, 150, 180, 210, 240, 255</p>
</div>
<div data-if="hdevelop" style="display:inline">
<h2 id="sec_example_hdevelop">例程 (HDevelop)</h2>
<pre class="example">
read_image(Image,'fabrik')
dual_rank(Image,ImageOpening,'circle',10,10,'mirrored')
dev_display(ImageOpening)
</pre>
</div>
<div data-if="c" style="display:none">
<h2 id="sec_example_c">例程 (C)</h2>
<pre class="example">
read_image(&amp;Image,"fabrik");
dual_rank(Image,&amp;ImageOpening,"circle",10,10,"mirrored");
disp_image(ImageOpening,WindowHandle);
</pre>
</div>
<div data-if="cpp" style="display:none">
<h2 id="sec_example_cpp">例程 (HDevelop)</h2>
<pre class="example">
read_image(Image,'fabrik')
dual_rank(Image,ImageOpening,'circle',10,10,'mirrored')
dev_display(ImageOpening)
</pre>
</div>
<div data-if="com" style="display:none">
<h2 id="sec_example_com">例程 (HDevelop)</h2>
<pre class="example">
read_image(Image,'fabrik')
dual_rank(Image,ImageOpening,'circle',10,10,'mirrored')
dev_display(ImageOpening)
</pre>
</div>
<div data-if="dotnet" style="display:none">
<h2 id="sec_example_dotnet">例程 (HDevelop)</h2>
<pre class="example">
read_image(Image,'fabrik')
dual_rank(Image,ImageOpening,'circle',10,10,'mirrored')
dev_display(ImageOpening)
</pre>
</div>
<h2 id="sec_complexity">Complexity</h2>
<p>For each pixel: <span title="1" style="vertical-align:-0.291583em" class="math"><!-- Created by MetaPost 1.902 on 2023.05.15:2033 --><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="5.05524em" height="1.22652em" viewBox="0 0 80.883820 19.624374">
<!-- Original BoundingBox: -40.441910 -9.812180 40.441910 9.812195 -->
  <defs>
    <g transform="scale(0.009963,0.009963)" id="GLYPHcmr10_48">
      <path style="fill-rule: evenodd;" d="M460.000000 -320.000000C460.000000 -400.000000,455.000000 -480.000000,420.000000 -554.000000C374.000000 -650.000000,292.000000 -666.000000,250.000000 -666.000000C190.000000 -666.000000,117.000000 -640.000000,76.000000 -547.000000C44.000000 -478.000000,39.000000 -400.000000,39.000000 -320.000000C39.000000 -245.000000,43.000000 -155.000000,84.000000 -79.000000C127.000000 2.000000,200.000000 22.000000,249.000000 22.000000C303.000000 22.000000,379.000000 1.000000,423.000000 -94.000000C455.000000 -163.000000,460.000000 -241.000000,460.000000 -320.000000M249.000000 -0.000000C210.000000 -0.000000,151.000000 -25.000000,133.000000 -121.000000C122.000000 -181.000000,122.000000 -273.000000,122.000000 -332.000000C122.000000 -396.000000,122.000000 -462.000000,130.000000 -516.000000C149.000000 -635.000000,224.000000 -644.000000,249.000000 -644.000000C282.000000 -644.000000,348.000000 -626.000000,367.000000 -527.000000C377.000000 -471.000000,377.000000 -395.000000,377.000000 -332.000000C377.000000 -257.000000,377.000000 -189.000000,366.000000 -125.000000C351.000000 -30.000000,294.000000 -0.000000,249.000000 -0.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHcmr10_49">
      <path style="fill-rule: evenodd;" d="M294.000000 -640.000000C294.000000 -664.000000,294.000000 -666.000000,271.000000 -666.000000C209.000000 -602.000000,121.000000 -602.000000,89.000000 -602.000000L89.000000 -571.000000C109.000000 -571.000000,168.000000 -571.000000,220.000000 -597.000000L220.000000 -79.000000C220.000000 -43.000000,217.000000 -31.000000,127.000000 -31.000000L95.000000 -31.000000L95.000000 -0.000000L257.000000 -0.000000L130.000000 -3.000000L217.000000 -3.000000L257.000000 -3.000000L297.000000 -3.000000L384.000000 -3.000000L419.000000 -0.000000L419.000000 -31.000000L387.000000 -31.000000C297.000000 -31.000000,294.000000 -42.000000,294.000000 -79.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHcmsy10_3">
      <path style="fill-rule: evenodd;" d="M275.000000 -427.000000C276.000000 -441.000000,276.000000 -465.000000,250.000000 -465.000000C234.000000 -465.000000,221.000000 -452.000000,224.000000 -439.000000L224.000000 -426.000000L238.000000 -271.000000L110.000000 -364.000000C101.000000 -369.000000,99.000000 -371.000000,92.000000 -371.000000C78.000000 -371.000000,65.000000 -357.000000,65.000000 -343.000000C65.000000 -327.000000,75.000000 -323.000000,85.000000 -318.000000L227.000000 -250.000000L89.000000 -183.000000C73.000000 -175.000000,65.000000 -171.000000,65.000000 -156.000000C65.000000 -141.000000,78.000000 -128.000000,92.000000 -128.000000C99.000000 -128.000000,101.000000 -128.000000,126.000000 -147.000000L238.000000 -228.000000L223.000000 -60.000000C223.000000 -39.000000,241.000000 -34.000000,249.000000 -34.000000C261.000000 -34.000000,276.000000 -41.000000,276.000000 -60.000000L261.000000 -228.000000L389.000000 -135.000000C398.000000 -130.000000,400.000000 -128.000000,407.000000 -128.000000C421.000000 -128.000000,434.000000 -142.000000,434.000000 -156.000000C434.000000 -171.000000,425.000000 -176.000000,413.000000 -182.000000C353.000000 -212.000000,351.000000 -212.000000,272.000000 -249.000000L410.000000 -316.000000C426.000000 -324.000000,434.000000 -328.000000,434.000000 -343.000000C434.000000 -358.000000,421.000000 -371.000000,407.000000 -371.000000C400.000000 -371.000000,398.000000 -371.000000,373.000000 -352.000000L261.000000 -271.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHcmsy10_112">
      <path style="fill-rule: evenodd;" d="M389.000000 855.000000L213.000000 466.000000C206.000000 450.000000,201.000000 450.000000,198.000000 450.000000C197.000000 450.000000,192.000000 450.000000,181.000000 458.000000L86.000000 530.000000C73.000000 540.000000,73.000000 543.000000,73.000000 546.000000C73.000000 551.000000,76.000000 557.000000,83.000000 557.000000C89.000000 557.000000,106.000000 543.000000,117.000000 535.000000C123.000000 530.000000,138.000000 519.000000,149.000000 511.000000L346.000000 944.000000C353.000000 960.000000,358.000000 960.000000,367.000000 960.000000C382.000000 960.000000,385.000000 954.000000,392.000000 940.000000L846.000000 -0.000000C853.000000 -14.000000,853.000000 -18.000000,853.000000 -20.000000C853.000000 -30.000000,845.000000 -40.000000,833.000000 -40.000000C825.000000 -40.000000,818.000000 -35.000000,810.000000 -19.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHcmmi10_70">
      <path style="fill-rule: evenodd;" d="M303.000000 -325.000000L400.000000 -325.000000C475.000000 -325.000000,483.000000 -309.000000,483.000000 -280.000000C483.000000 -273.000000,483.000000 -261.000000,476.000000 -231.000000C474.000000 -226.000000,473.000000 -222.000000,473.000000 -220.000000C473.000000 -212.000000,479.000000 -208.000000,485.000000 -208.000000C495.000000 -208.000000,495.000000 -211.000000,500.000000 -229.000000L555.000000 -446.000000C558.000000 -457.000000,558.000000 -459.000000,558.000000 -462.000000C558.000000 -464.000000,556.000000 -473.000000,546.000000 -473.000000C536.000000 -473.000000,535.000000 -468.000000,531.000000 -452.000000C510.000000 -374.000000,487.000000 -356.000000,402.000000 -356.000000L311.000000 -356.000000L375.000000 -610.000000C384.000000 -645.000000,385.000000 -649.000000,429.000000 -649.000000L561.000000 -649.000000C684.000000 -649.000000,707.000000 -616.000000,707.000000 -539.000000C707.000000 -516.000000,707.000000 -512.000000,704.000000 -485.000000C702.000000 -472.000000,702.000000 -470.000000,702.000000 -467.000000C702.000000 -462.000000,705.000000 -455.000000,714.000000 -455.000000C725.000000 -455.000000,726.000000 -461.000000,728.000000 -480.000000L748.000000 -653.000000C751.000000 -680.000000,746.000000 -680.000000,721.000000 -680.000000L231.000000 -680.000000C211.000000 -680.000000,201.000000 -680.000000,201.000000 -660.000000C201.000000 -649.000000,210.000000 -649.000000,229.000000 -649.000000C266.000000 -649.000000,294.000000 -649.000000,294.000000 -631.000000C294.000000 -627.000000,294.000000 -625.000000,289.000000 -607.000000L157.000000 -78.000000C147.000000 -39.000000,145.000000 -31.000000,66.000000 -31.000000C49.000000 -31.000000,38.000000 -31.000000,38.000000 -12.000000C38.000000 -0.000000,50.000000 -0.000000,53.000000 -0.000000L185.000000 -0.000000L82.000000 -0.000000L156.000000 -3.000000L185.000000 -3.000000L218.000000 -3.000000L301.000000 -0.000000L334.000000 -0.000000C343.000000 -0.000000,355.000000 -0.000000,355.000000 -19.000000C355.000000 -27.000000,349.000000 -29.000000,349.000000 -30.000000C346.000000 -31.000000,344.000000 -31.000000,321.000000 -31.000000C299.000000 -31.000000,294.000000 -31.000000,269.000000 -33.000000C240.000000 -36.000000,237.000000 -40.000000,237.000000 -53.000000C237.000000 -55.000000,237.000000 -61.000000,241.000000 -76.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHptmr8r_40">
      <path style="fill-rule: evenodd;" d="M295.000000 -676.000000C221.000000 -628.000000,191.000000 -602.000000,154.000000 -556.000000C83.000000 -469.000000,48.000000 -369.000000,48.000000 -252.000000C48.000000 -125.000000,85.000000 -27.000000,173.000000 75.000000C214.000000 123.000000,240.000000 145.000000,292.000000 177.000000L304.000000 161.000000C224.000000 98.000000,196.000000 63.000000,169.000000 -12.000000C145.000000 -79.000000,134.000000 -155.000000,134.000000 -255.000000C134.000000 -360.000000,147.000000 -442.000000,174.000000 -504.000000C202.000000 -566.000000,232.000000 -602.000000,304.000000 -660.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHptmr8r_41">
      <path style="fill-rule: evenodd;" d="M38.000000 177.000000C112.000000 129.000000,142.000000 103.000000,179.000000 57.000000C250.000000 -30.000000,285.000000 -130.000000,285.000000 -247.000000C285.000000 -375.000000,248.000000 -472.000000,160.000000 -574.000000C119.000000 -622.000000,93.000000 -644.000000,41.000000 -676.000000L29.000000 -660.000000C109.000000 -597.000000,136.000000 -562.000000,164.000000 -487.000000C188.000000 -420.000000,199.000000 -344.000000,199.000000 -244.000000C199.000000 -140.000000,186.000000 -57.000000,159.000000 4.000000C131.000000 67.000000,101.000000 103.000000,29.000000 161.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHptmr8r_79">
      <path style="fill-rule: evenodd;" d="M361.000000 -676.000000C170.000000 -676.000000,34.000000 -532.000000,34.000000 -331.000000C34.000000 -237.000000,66.000000 -146.000000,120.000000 -88.000000C178.000000 -25.000000,267.000000 14.000000,355.000000 14.000000C552.000000 14.000000,688.000000 -126.000000,688.000000 -327.000000C688.000000 -426.000000,659.000000 -511.000000,604.000000 -571.000000C541.000000 -640.000000,457.000000 -676.000000,361.000000 -676.000000M361.000000 -640.000000C407.000000 -640.000000,453.000000 -622.000000,489.000000 -590.000000C543.000000 -541.000000,574.000000 -447.000000,574.000000 -328.000000C574.000000 -269.000000,561.000000 -200.000000,541.000000 -148.000000C532.000000 -123.000000,515.000000 -98.000000,492.000000 -75.000000C457.000000 -40.000000,412.000000 -22.000000,359.000000 -22.000000C313.000000 -22.000000,268.000000 -40.000000,233.000000 -71.000000C181.000000 -117.000000,148.000000 -218.000000,148.000000 -329.000000C148.000000 -431.000000,176.000000 -528.000000,218.000000 -575.000000C257.000000 -618.000000,306.000000 -640.000000,361.000000 -640.000000"></path>
    </g>
  </defs>
  <g transform="matrix(1.600006,-0.000000,-0.000000,1.600006,0.574081 14.959045)" style="fill: rgb(0.000000%,0.000000%,0.000000%);">
    <use xlink:href="#GLYPHptmr8r_79"></use>
    <use xlink:href="#GLYPHptmr8r_40" x="7.220077"></use>
  </g>
  <g transform="matrix(1.600006,-0.000000,-0.000000,1.600006,17.390945 1.462997)" style="fill: rgb(0.000000%,0.000000%,0.000000%);">
    <use xlink:href="#GLYPHcmsy10_112"></use>
  </g>
  <path d="M30.674515 1.144119L43.138885 1.144119" style="stroke:rgb(0.000000%,0.000000%,0.000000%); stroke-width: 0.637604;stroke-linejoin: round;stroke-miterlimit: 10.000000;fill: none;"></path>
  <g transform="matrix(1.600006,-0.000000,-0.000000,1.600006,30.674515 14.959045)" style="fill: rgb(0.000000%,0.000000%,0.000000%);">
    <use xlink:href="#GLYPHcmmi10_70"></use>
  </g>
  <g transform="matrix(1.600006,-0.000000,-0.000000,1.600006,46.681137 14.959045)" style="fill: rgb(0.000000%,0.000000%,0.000000%);">
    <use xlink:href="#GLYPHcmsy10_3"></use>
  </g>
  <g transform="matrix(1.600006,-0.000000,-0.000000,1.600006,58.193512 14.959045)" style="fill: rgb(0.000000%,0.000000%,0.000000%);">
    <use xlink:href="#GLYPHcmr10_49"></use>
    <use xlink:href="#GLYPHcmr10_48" x="5.000095"></use>
  </g>
  <g transform="matrix(1.600006,-0.000000,-0.000000,1.600006,74.133881 14.959045)" style="fill: rgb(0.000000%,0.000000%,0.000000%);">
    <use xlink:href="#GLYPHptmr8r_41"></use>
  </g>
</svg></span> with F =
area of the structuring element.</p>
<h2 id="sec_result">结果</h2>
<p>If the parameter values are correct 该算子
<code><span data-if="hdevelop" style="display:inline">dual_rank</span><span data-if="c" style="display:none">dual_rank</span><span data-if="cpp" style="display:none">DualRank</span><span data-if="com" style="display:none">DualRank</span><span data-if="dotnet" style="display:none">DualRank</span><span data-if="python" style="display:none">dual_rank</span></code> 返回值 <TT>2</TT> (
      <TT>H_MSG_TRUE</TT>)
    .  The behavior in case
of empty input (no input images available) is set via 该算子
<a href="set_system.html"><code><span data-if="hdevelop" style="display:inline">set_system('no_object_result',&lt;Result&gt;)</span><span data-if="c" style="display:none">set_system("no_object_result",&lt;Result&gt;)</span><span data-if="cpp" style="display:none">SetSystem("no_object_result",&lt;Result&gt;)</span><span data-if="com" style="display:none">SetSystem("no_object_result",&lt;Result&gt;)</span><span data-if="dotnet" style="display:none">SetSystem("no_object_result",&lt;Result&gt;)</span><span data-if="python" style="display:none">set_system("no_object_result",&lt;Result&gt;)</span></code></a>.
If necessary an exception is raised.</p>
<h2 id="sec_predecessors">可能的前置算子</h2>
<p>
<code><a href="read_image.html"><span data-if="hdevelop" style="display:inline">read_image</span><span data-if="c" style="display:none">read_image</span><span data-if="cpp" style="display:none">ReadImage</span><span data-if="com" style="display:none">ReadImage</span><span data-if="dotnet" style="display:none">ReadImage</span><span data-if="python" style="display:none">read_image</span></a></code>
</p>
<h2 id="sec_successors">可能的后置算子</h2>
<p>
<code><a href="threshold.html"><span data-if="hdevelop" style="display:inline">threshold</span><span data-if="c" style="display:none">threshold</span><span data-if="cpp" style="display:none">Threshold</span><span data-if="com" style="display:none">Threshold</span><span data-if="dotnet" style="display:none">Threshold</span><span data-if="python" style="display:none">threshold</span></a></code>, 
<code><a href="dyn_threshold.html"><span data-if="hdevelop" style="display:inline">dyn_threshold</span><span data-if="c" style="display:none">dyn_threshold</span><span data-if="cpp" style="display:none">DynThreshold</span><span data-if="com" style="display:none">DynThreshold</span><span data-if="dotnet" style="display:none">DynThreshold</span><span data-if="python" style="display:none">dyn_threshold</span></a></code>, 
<code><a href="sub_image.html"><span data-if="hdevelop" style="display:inline">sub_image</span><span data-if="c" style="display:none">sub_image</span><span data-if="cpp" style="display:none">SubImage</span><span data-if="com" style="display:none">SubImage</span><span data-if="dotnet" style="display:none">SubImage</span><span data-if="python" style="display:none">sub_image</span></a></code>, 
<code><a href="regiongrowing.html"><span data-if="hdevelop" style="display:inline">regiongrowing</span><span data-if="c" style="display:none">regiongrowing</span><span data-if="cpp" style="display:none">Regiongrowing</span><span data-if="com" style="display:none">Regiongrowing</span><span data-if="dotnet" style="display:none">Regiongrowing</span><span data-if="python" style="display:none">regiongrowing</span></a></code>
</p>
<h2 id="sec_alternatives">可替代算子</h2>
<p>
<code><a href="rank_image.html"><span data-if="hdevelop" style="display:inline">rank_image</span><span data-if="c" style="display:none">rank_image</span><span data-if="cpp" style="display:none">RankImage</span><span data-if="com" style="display:none">RankImage</span><span data-if="dotnet" style="display:none">RankImage</span><span data-if="python" style="display:none">rank_image</span></a></code>, 
<code><a href="gray_closing.html"><span data-if="hdevelop" style="display:inline">gray_closing</span><span data-if="c" style="display:none">gray_closing</span><span data-if="cpp" style="display:none">GrayClosing</span><span data-if="com" style="display:none">GrayClosing</span><span data-if="dotnet" style="display:none">GrayClosing</span><span data-if="python" style="display:none">gray_closing</span></a></code>, 
<code><a href="gray_opening.html"><span data-if="hdevelop" style="display:inline">gray_opening</span><span data-if="c" style="display:none">gray_opening</span><span data-if="cpp" style="display:none">GrayOpening</span><span data-if="com" style="display:none">GrayOpening</span><span data-if="dotnet" style="display:none">GrayOpening</span><span data-if="python" style="display:none">gray_opening</span></a></code>, 
<code><a href="median_image.html"><span data-if="hdevelop" style="display:inline">median_image</span><span data-if="c" style="display:none">median_image</span><span data-if="cpp" style="display:none">MedianImage</span><span data-if="com" style="display:none">MedianImage</span><span data-if="dotnet" style="display:none">MedianImage</span><span data-if="python" style="display:none">median_image</span></a></code>
</p>
<h2 id="sec_see">参考其它</h2>
<p>
<code><a href="gen_circle.html"><span data-if="hdevelop" style="display:inline">gen_circle</span><span data-if="c" style="display:none">gen_circle</span><span data-if="cpp" style="display:none">GenCircle</span><span data-if="com" style="display:none">GenCircle</span><span data-if="dotnet" style="display:none">GenCircle</span><span data-if="python" style="display:none">gen_circle</span></a></code>, 
<code><a href="gen_rectangle1.html"><span data-if="hdevelop" style="display:inline">gen_rectangle1</span><span data-if="c" style="display:none">gen_rectangle1</span><span data-if="cpp" style="display:none">GenRectangle1</span><span data-if="com" style="display:none">GenRectangle1</span><span data-if="dotnet" style="display:none">GenRectangle1</span><span data-if="python" style="display:none">gen_rectangle1</span></a></code>, 
<code><a href="gray_erosion_rect.html"><span data-if="hdevelop" style="display:inline">gray_erosion_rect</span><span data-if="c" style="display:none">gray_erosion_rect</span><span data-if="cpp" style="display:none">GrayErosionRect</span><span data-if="com" style="display:none">GrayErosionRect</span><span data-if="dotnet" style="display:none">GrayErosionRect</span><span data-if="python" style="display:none">gray_erosion_rect</span></a></code>, 
<code><a href="gray_dilation_rect.html"><span data-if="hdevelop" style="display:inline">gray_dilation_rect</span><span data-if="c" style="display:none">gray_dilation_rect</span><span data-if="cpp" style="display:none">GrayDilationRect</span><span data-if="com" style="display:none">GrayDilationRect</span><span data-if="dotnet" style="display:none">GrayDilationRect</span><span data-if="python" style="display:none">gray_dilation_rect</span></a></code>, 
<code><a href="sigma_image.html"><span data-if="hdevelop" style="display:inline">sigma_image</span><span data-if="c" style="display:none">sigma_image</span><span data-if="cpp" style="display:none">SigmaImage</span><span data-if="com" style="display:none">SigmaImage</span><span data-if="dotnet" style="display:none">SigmaImage</span><span data-if="python" style="display:none">sigma_image</span></a></code>
</p>
<h2 id="sec_references">References</h2>
<p>

W. Eckstein, O. Munkelt
“Extracting Objects from Digital Terrain Model”
Remote Sensing and Reconstruction for Threedimensional Objects and Scenes,
SPIE Symposium on Optical Science, Engeneering, and Instrumentation,
July 1995, San Diego
</p>
<h2 id="sec_module">模块</h2>
<p>
Foundation</p>
<!--OP_REF_FOOTER_START-->
<hr>
<div class="indexlink">
<a href="index_classes.html"><span data-if="dotnet" style="display:none;">类别</span><span data-if="cpp" style="display:none;">类别</span></a><span data-if="dotnet" style="display:none;"> | </span><span data-if="cpp" style="display:none;"> | </span><a href="index_by_name.html">算子列表</a>
</div>
<div class="footer">
<div class="copyright">HALCON算子参考手册 Copyright © 2015-2023 51Halcon</div>
</div>
</div>
</body>
</html>
